<div class="sidebar-menu flex-fill">
    <div class="sidebar-scroll">
        <div class="sidebar-menu-inner">
            {% set data = load_data(path="content/navsites.yml", format="yaml") %}
            {% if data %}
            <ul>
                {% for taxonomy_item in data %}
                {% if taxonomy_item.list[0].links[0].title %}
                {% set index = loop.index %}
                {% set hash_str = index ~ "-main-" ~ taxonomy_item.taxonomy %}
                {% set hash_str_sha = get_hash(literal=hash_str, sha_type=256, base64=false) | safe %}
                <li class="sidebar-item">
                    <a href="#category-{{ hash_str_sha }}" class="smooth">
                        {% if taxonomy_item.icon %}<i class="{{ taxonomy_item.icon }} icon-fw icon-lg mr-2"></i>{% endif %}
                        <span>{{ taxonomy_item.taxonomy }}</span>
                        <i class="fas fa-angle-right sidebar-more text-sm"></i>
                    </a>
                    {% set list = taxonomy_item.list %}
                    <ul>
                        {% for item in list %}
                        {% set hash_str_sub = index ~ "-" ~ loop.index ~ "-child-" ~ item.term %}
                        {% set hash_str_sub_sha = get_hash(literal=hash_str_sub, sha_type=256, base64=false) | safe %}
                        <li>
                            <a href="#category-{{ hash_str_sub_sha }}" class="smooth">
                                {% if item.icon %}<i class="{{ item.icon }} icon-fw icon-lg mr-2"></i>{% endif %}
                                <span>{{ item.term }}</span>
                            </a>
                        </li>
                        {% endfor %}
                    </ul>
                </li> 
                {% endif %}               
                {% endfor %}
            </ul>
            {% endif %}
        </div>
    </div>
</div>
